pp108 : Sending Alerts to Windows Event Log

Sending Alerts to Windows Event Log

Before you begin this task:
Before making the changes in Log4jConfiguration.xml file, ensure that the content in XML is valid. The changes made in Log4jConfiguration.xml will be applied immediately.

In this section, you will learn how to use Windows Event Log and view the log messages. The following example illustrates the configuration of the NTEventLogAppender.

Adding a logging category

  1. Go to Process_Platform_install_dir/config directory and open the file Log4jConfiguration.xml.
  2. Add the following category.
    <category name="com.eibus.management.AlertSystem">
        <priority value="info"/>
        <appender-ref ref="NTEventLogAppender"/>
    </category>
    
  3. Add the Appender NTEventLogAppender.
    <appender class="org.apache.log4j.nt.NTEventLogAppender"
        name="NTEventLogAppender" xmlns="">
        <layout class="org.apache.log4j.SimpleLayout"/>
        <param name="source" value="CordysLogger"/>
    </appender>
    
  4. After making the necessary changes, save the file.

Viewing log entries

  1. Perform any operation that raises alerts such as restarting the Monitor, sending a license report, restarting the database server and so on.
  2. Open Windows Event Viewer. Check the alerts in the Event Viewer window as shown in the below figure: